<?php
namespace Admin\Controller;
use Think\Controller;


class UploadController extends Controller {

    public function upload(){
        if (!checkCookie()) {
            $this->redirect('Admin/Index/login');
        }
        //接收文件 调用文件上传
        $upload = new \Admin\Controller\MyUploadController();
        $info = $upload->upload();
        if (!$info) {
            $this->ajaxReturn(ajax_data(1,'上传失败'));
        } else {
            $this->ajaxReturn(ajax_data(0,'上传成功',$info));
        }
    }
}

  